﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Simple.Entity.Enums;

namespace Simple.ViewModel
{
    public class MenuListModel
    {
        public long Id { get; set; }
        /// <summary>
        /// 模块名称
        /// </summary>
        //public string ModularName { get; set; }
        /// <summary>
        /// 菜单名称
        /// </summary>
        public string MenuName { get; set; }

        /// <summary>
        /// 菜单路径
        /// </summary>
        public string MenuUrl
        {
            get
            {
                return string.Format("/{0}/{1}", this.ControllerName, this.ActionName);
            }
        }

        public string ControllerName { get; set; }

        public string ActionName { get; set; }
        /// <summary>
        /// 图标
        /// </summary>
        public string iconCls { get; set; }

        /// <summary>
        /// 父Id
        /// </summary>
        public long ParentId { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 菜单类型【菜单模块 1，菜单 2，菜单按钮 3】
        /// </summary>
        public MenuTypeEnum MenuType { get; set; }

        /// <summary>
        /// 获取菜单类型描述
        /// </summary>
        public string MenuTypeName
        {
            get
            {
                return MenuType.ToString();
            }
        }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; }

        public IList<MenuListModel> children { get; set; }
    }
}
